package com.bkgy.util;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;

public class MyUtil {
    public static void main(String[] args) throws Exception {
        FileInputStream fis = new FileInputStream("C:\\Users\\dell\\Desktop\\test.txt");
        BufferedReader br = new BufferedReader(new InputStreamReader(fis, "UTF-8"));

        String s = null;
        while ((s = br.readLine()) != null) {
            System.out.println(buildSqlIn(s));
        }
        br.close();
    }

    //构建SQL语句in参数
    private static String buildSqlIn(String str){
        return "'" + str+"',";
    }

    //首字母转大写
    private static String firstChar2Up(String str) {
        if(str == null || str.length() == 0){
            return str;
        }
        return str.substring(0,1).toUpperCase()+str.substring(1);
    }

    //大写字符串转驼峰
    private static String convertToCamelCaseManual(String upperCaseString) {
        upperCaseString = upperCaseString.toLowerCase();
        String[] parts = upperCaseString.split("_");
        StringBuilder sbf = new StringBuilder();
        for (int i = 0; i < parts.length; i++) {
            if (i > 0) {
                sbf.append(Character.toUpperCase(parts[i].charAt(0)));
                sbf.append(parts[i].substring(1));
            } else {
                sbf.append(parts[i]);
            }
        }
        return sbf.toString();
    }
}
